﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SchemeDesign.aspx.cs" Inherits="SkWeb.FASJ.SchemeDesign" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>方案设计</title>
    <link href="../easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <link id="easyuiTheme" href="../easyui/themes/default/easyui.css" rel="stylesheet"
        type="text/css" />
    <script src="../easyui/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="../easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../js/index.js" type="text/javascript"></script>
    <script type="text/javascript">

        var xcInfo = "";
        var flag = "";
        jQuery.cookie = function (key, value, options) {

            // key and value given, set cookie...
            if (arguments.length > 1 && (value === null || typeof value !== "object")) {
                options = jQuery.extend({}, options);

                if (value === null) {
                    options.expires = -1;
                }

                if (typeof options.expires === 'number') {
                    var days = options.expires, t = options.expires = new Date();
                    t.setDate(t.getDate() + days);
                }

                return (document.cookie = [
            encodeURIComponent(key), '=',
            options.raw ? String(value) : encodeURIComponent(String(value)),
            options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
            options.path ? '; path=' + options.path : '',
            options.domain ? '; domain=' + options.domain : '',
            options.secure ? '; secure' : ''
        ].join(''));
            }

            // key and possibly options given, get cookie...
            options = value || {};
            var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
            return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
        };




        var currentWellName = "";
        var wellName = '';
        var message = '';
        function enterPressSubmit(eleId, e) {
            var keynum;
            if (window.event) // IE
            {
                keynum = e.keyCode;
                if (keynum == 13) {
                    event.keyCode = 9;
                    $("#" + eleId).click();
                }
                else {
                    return;
                }
            }
            else if (e.which) // Netscape/Firefox/Opera
            {
                keynum = e.which;
                if (keynum == 13) {
                    $("#" + eleId).click();
                }
                else {
                    return;
                }
            }
        }
        /*
        function SubmitRedirect() {

        if ($("#txtHiddenId").val() == undefined || $("#txtHiddenId").val() == "") {
        $.messager.alert("Warning", "请选择待处理的井信息！", "Warning");
        return;
        }

        $.post(
        '../RiskDB/Handler.ashx?op=queryrisk',
        {
        name: wellName
        },
        function (data, statusText) {

        $.messager.alert("提示", data, "提示");
        message = data;

        $("#dialogSchemeType").dialog("open");
        }
        );


        //            $.post(
        //                '../Handlers/SkgysjbHandler.aspx?op=updateskgysjb',
        //                {
        //                    id: $("#txtHiddenId").val(),
        //                    jb: $("#txtJB").combobox("getValue"),
        //                    qcyzsd: $("#txtQCYZSD").val(),
        //                    skjd1: $("#txtSKJD1").val(),
        //                    skjd2: $("#txtSKJD2").val(),
        //                    yggg: $("#txtYGGG").combobox("getValue"),
        //                    wjymc: $("#txtWJYMC").combobox("getValue"),
        //                    wjymd: $("#txtWJYMD").val(),
        //                    skqx: $("#txtSKQX").combobox("getValue"),
        //                    skdx: $("#txtSKDX").combobox("getValue"),
        //                    lrr: $("#txtLRR").text(),
        //                    shr: $("#txtSHR").text()
        //                },
        //                function (data, statusText) {
        //                    if (data.success) {
        //                        $("#dialogSchemeType").dialog("open");
        //                    }
        //                    else {
        //                        $.messager.alert("Error", "提交数据异常！", "Error");
        //                    }
        //                }
        //                );


        }*/

        $(function () {


            function changeThemeFun(themeName) {/* 更换主题 */
                var $easyuiTheme = $('#easyuiTheme');
                var url = $easyuiTheme.attr('href');
                var href = url.substring(0, url.indexOf('themes')) + 'themes/' + themeName + '/easyui.css';
                $easyuiTheme.attr('href', href);

                var $iframe = $('iframe');
                if ($iframe.length > 0) {
                    for (var i = 0; i < $iframe.length; i++) {
                        var ifr = $iframe[i];
                        $(ifr).contents().find('#easyuiTheme').attr('href', href);
                    }
                }

            };
            if ($.cookie('easyuiThemeName')) {
                changeThemeFun($.cookie('easyuiThemeName'));
            }


            $(document).keydown(function (event) {

                enterPressSubmit("aSubmitRedirect", event);
            });

            // ********************************** 井数据列表 ******************************

            $("#dg").datagrid({
                url: '../Handlers/SchemeDesignHandler.aspx?op=getschemedesignwell',
                columns: [
                [
                    { field: "ID", title: "id", hidden: true },
                    { field: "JH", title: "井号", width: 200 },
                    { field: "JB", title: "井别", width: 70 },
                    { field: "CSFS", title: "传输方式" },
                    { field: "SGLX", title: "施工类型" },
                    { field: "ZHUANGTAI", title: "状态" }
                //                    { field: "sh", checkbox: true }


                ]
            ],
                pagination: true,
                pageSize: 20,
                pageList: [15, 20, 25],
                singleSelect: true,
                loadMsg: '数据加载中......',
                rownumbers: true,
                method: "post",
                idField: "ID",
                toolbar: "#tb",
                queryParams:
                {
                    jh: $('#txtId').val()
                },
                onSelect: function (rowIndex, rowData) {
                    if (rowData) {

                        doRefresh(rowData.ID);
                        $("#txtHiddenId").val(rowData.ID);
                        currentWellName = rowData.JH;
                        //$("#txtJB").val(rowData.JB);
                        // $("#txtJB").combobox("setValue", rowData.JB);
                        // $("#txtQCYZSD").val(rowData.ZLHSD);
                        // $("#txtSKJD1").val(rowData.SKJD1);
                        // $("#txtSKJD2").val(rowData.SKJD2);
                        // $("#txtWJYMC").combobox("setValue", rowData.WJYMC);
                        // $("#txtWJYMD").val(rowData.WJYMD);
                        // $("#txtYGGG").combobox("setValue", rowData.YGGG);
                        // $("#txtSKQX").combobox("setValue", rowData.SKQX);
                        // $("#txtSKDX").combobox("setValue", rowData.SKDX);
                        // $("#lblSHR").text(rowData.SHR);
                        // $("#lblLRR").text(rowData.LRR);

                        wellName = rowData.JH;
                    }
                },
                onLoadSuccess: function () {
                    $("#dg").datagrid("selectRow", 0);

                },
                rowStyler: function (index, row) {
                    return "font-size:21px";
                }
            });

            //设置分页控件  
            var p = $('#dg').datagrid('getPager');
            $(p).pagination({
                pageSize: 20, //每页显示的记录条数，默认为10  
                pageList: [15, 20, 25], //可以设置每页记录条数的列表  
                beforePageText: '第', //页数文本框前显示的汉字  
                afterPageText: '页    共 {pages} 页',
                displayMsg: ''
                /*displayMsg: '当前显示 {from} - {to} 条记录   共 {total} 条记录'
                */
            });

            $("#txtId").keydown(function (event) {
                enterPressSubmit("dataid", event);
            });

            $("#dataid").click(function () {
                $("#dg").datagrid("load",
                { jh: $('#txtId').val(), days: 10000 });
            });

            $("#aSubmitRedirect").click(function () {

                if ($("#前磁遇阻深度").val() == "—" && $("#阻流环深度").val() != "—") {
                    alert("将文档中的前磁遇阻深度改为阻流环深度");
                }

                if ($("#txtHiddenId").val() == undefined || $("#txtHiddenId").val() == "") {
                    $.messager.alert("Warning", "请选择待处理的井信息！", "Warning");
                    return;
                }
                $.post(
                '../Handlers/XiaocengJsHandler.aspx?ischeck=1',
                {
                    ID: $("#txtHiddenId").val()

                },
                function (data1, statusText1) {
                    data1 = eval('(' + data1 + ')');
                    if (data1.Is_hava) {

                        alert("这口井已经设计并被被保存，不能重复设计");
                    }
                    else {

                        $.post(
                '../RiskDB/Handler.ashx?op=queryrisk',
                {
                    name: wellName
                },

                function (data, statusText) {
                    var jb;

                    $.post(
                '../Handlers/XiaocengJsHandler.aspx',
                {
                    name: wellName,
                    ID: $("#txtHiddenId").val()
                },
                function (data1, statusText1) {
                    jb = data1.jb;

                    data1 = eval('(' + data1 + ')');

                    strs = data1.Items;
                    items = strs.split(';');
                    xcInfo = items;
                    flag = data1.flag;
                    var text = "";
                    //text = data + "<br/>" + "补孔井分级：" + data1.Jb + "<br/>" + "新井压力：" + (items.length - 1) / 2;
                    if (data1.SGLX == "新井射孔" || data1.SGLX == "外厂作业") {
                        text = data; // +"<br/><br/>新井压力：" + (items.length - 1) / 2;

                        if (data1.DCYL >= 20 && data1.DCYL <= 35) {
                            text += "<br/><br/>地层压力：" + data1.DCYL + "，建议选用35兆帕防喷器";
                        }
                        else if (data1.DCYL > 35) {
                            text += "<br/><br/>地层压力：" + data1.DCYL + "，建议选用70兆帕防喷器";
                        }

                        if (data1.JX >= 35) {
                            text += "<br/><br/>井斜：" + data1.JX + "，建议使用压力起爆方式";
                        }
                        if (data1.JC == "1") {
                            text += "<br/><br/>井斜：" + data1.JX + "，建议采用分层起爆方式";
                        }
                    }
                    else if (data1.SGLX == "试油射孔") {
                        text = data + "<br/>此井为试油射孔井";
                    }
                    else {
                        text = data + "补孔井分级：" + data1.Jb + "<br/>";

                        if (data1.DCYL >= 20 && data1.DCYL <= 35) {
                            text += "<br/>地层压力：" + data1.DCYL + "，建议选用35兆帕防喷器";
                        }
                        else if (data1.DCYL > 35) {
                            text += "<br/>地层压力：" + data1.DCYL + "，提示选用70兆帕防喷器";
                        }

                        if (data1.JX >= 35) {
                            text += "<br/>井斜：" + data1.JX + "，建议使用压力起爆方式";
                        }
                        if (data1.JC == "1") {
                            text += "<br/>井斜：" + data1.JX + "，建议采用分层起爆方式";
                        }
                    }

                    document.getElementById("newdiv").innerHTML = text;


                    message = data;
                    if (data1.USER_NAME == null) {
                        $("#dialogSchemeType").dialog("open");

                    }
                    else {
                        if (confirm("当前井号已经被" + data1.USER_NAME + "设计，确定继续吗？" + data1.Msg_hint)) {
                            $("#dialogSchemeType").dialog("open");
                        }
                        else { }
                    }
                });

                }
                );

                    }

                });


            });

            // ********************************** 选择方案类型 ******************************
            $('#dg').datagrid({ singleSelect: (true) })
            //自动生成
            $("#btnzdsc").click(function () {
                //$("#dialogSchemeType").dialog("close");
                //$("#dialogColumnParams").dialog("open");
                var node = $("#divtemplate").treegrid("getSelected");
                if (node) {
                    $("#hiddenTempalteID").val(node.TMP_ID);
                    $("#hiddenTempalteName").val(node.TMP_MC);

                }

                var data = "";


                table_ = document.getElementById("tab_data");
                for (var i = 1; i < table_.rows.length - 1; i++) {
                    var obj = table_.rows[i].getElementsByTagName("input");
                    if (obj.length == 0)
                        obj = table_.rows[i].getElementsByTagName("select");
                    bookmarkName = obj[0].name;
                    inputValue = obj[0].value;
                    if (bookmarkName == "枪型") {
                        inputValue += "-" + obj[1].value;
                    }
                    data += inputValue + ',' + bookmarkName + ';';
                }
                //
                //                if (flag != "0") {
                //                    for (var i = 0; i * 2 < xcInfo.length - 2; i++) {

                //                        if (i == 0) {
                //                            data += xcInfo[0] + ',' + "油顶" + ';';
                //                            data += xcInfo[1] + ',' + "油底" + ';';
                //                        } else {
                //                            data += xcInfo[i * 2] + ',' + "油顶" + i + ';';
                //                            data += xcInfo[i * 2 + 1] + ',' + "油底" + i + ';';
                //                        }
                //                    }
                //                }
                //                else {
                //                    alert("小层数据表中未发现该井的小层数据");
                //                }

                //TODO: 添加弹出 window 方法
                if (node.TMP_MC == "联作（投棒）" || node.TMP_MC == "联作（压差）") {

                    $("#dialogCS").dialog("open");

                    //parent.openTab(currentWellName, "../FAXZ/WordBrowse.aspx?op=browseFromLFS&id=" + $("#txtHiddenId").val() + "&tempalteid=" + $("#hiddenTempalteID").val() + "&message=" + message + "&data=" + data);
                }
                else {
                    parent.openTab(currentWellName, "../FAXZ/WordBrowse.aspx?op=browseFromLFS&id=" + $("#txtHiddenId").val() + "&tempalteid=" + $("#hiddenTempalteID").val() + "&message=" + message + "&data=" + data);
                }

                //                var opt = 'top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no';
                //                window.open("../FAXZ/WordBrowse.aspx?op=browseFromLFS&id=" + $("#txtHiddenId").val() + "&tempalteid=" + $("#hiddenTempalteID").val() + "&message=" + message + "&data=" + data, "", opt);


                //     document.getElementById("frame").src = "../FAXZ/WordBrowse.aspx?op=browseFromLFS&id=" + $("#txtHiddenId").val() + "&tempalteid=" + $("#hiddenTempalteID").val() + "&message=" + message;
                //      $('#w').window('open');
                //                var win = window.open("../FAXZ/WordBrowse.aspx?id=" + $("#txtHiddenId").val() + "&tempalteid=" + $("#hiddenTempalteID").val(), "",
                //                 "top=0,left=0,scrollbars=no,status=0,directory=0,location=0");
                //                var h = screen.availHeight;
                //                var w = screen.availWidth; 
                //                win.resizeTo(w, h);

            });

            $("#btnCS").click(function () {
                var cs = $("#txtCS").val();
                var data = "";


                table_ = document.getElementById("tab_data");
                for (var i = 1; i < table_.rows.length - 1; i++) {
                    var obj = table_.rows[i].getElementsByTagName("input");
                    if (obj.length == 0)
                        obj = table_.rows[i].getElementsByTagName("select");
                    bookmarkName = obj[0].name;
                    inputValue = obj[0].value;
                    data += inputValue + ',' + bookmarkName + ';';
                }


                //一级不执行
                //                if (flag != "0") {
                //                    for (var i = 0; i * 2 < xcInfo.length - 2; i++) {

                //                        if (i == 0) {
                //                            data += xcInfo[0] + ',' + "油顶" + ';';
                //                            data += xcInfo[1] + ',' + "油底" + ';';
                //                        } else {
                //                            data += xcInfo[i * 2] + ',' + "油顶" + i + ';';
                //                            data += xcInfo[i * 2 + 1] + ',' + "油底" + i + ';';
                //                        }
                //                    }
                //                }
                //                else {
                //                    alert("小层数据表中未发现该井的小层数据");
                //                }


                parent.openTab(currentWellName, "../FAXZ/WordBrowse.aspx?op=browseFromLFS&id=" + $("#txtHiddenId").val() + "&tempalteid=" + $("#hiddenTempalteID").val() + "&message=" + message + "&data=" + data + "&cs=" + cs);
            });

            //人工干预
            $("#btnrggy").click(function () {
                //$("#dialogSchemeType").dialog("close");
                var node = $("#divtemplate").treegrid("getSelected");
                if (node) {
                    $("#hiddenTempalteID").val(node.TMP_ID);
                }

                document.getElementById("frame").src = "../FAXZ/ExcelBrowse.aspx?id=" + $("#txtHiddenId").val() + "&tempalteid=" + $("#hiddenTempalteID").val();
                $('#w').window('open');
                //TODO: 添加弹出 window 方法
            });

            $("#divtemplate").treegrid({
                url: '../Handlers/SchemeDesignHandler.aspx?op=gettemplatetree&pid=11001',
                idField: 'TMP_ID',
                treeField: 'TMP_MC',
                columns: [[
                    { title: '', field: 'TMP_MC', width: 577 }
                ]],
                onClickRow: function (row) {
                    // if (row.getChildren(row.id).length > 0) {
                    $('#divtemplate').treegrid('toggle', row.TMP_ID);

                }

            });

            //点击灌输射孔
            $("#btngssk").click(function () {
                $("#divtemplate").treegrid({
                    url: '../Handlers/SchemeDesignHandler.aspx?op=gettemplatetree&pid=11001',
                    idField: 'TMP_ID',
                    treeField: 'TMP_MC',
                    columns: [[
                    { title: '', field: 'TMP_MC', width: 577 }
                ]]

                });
            });

            //点击电缆射孔
            $("#btndlsk").click(function () {
                $("#divtemplate").treegrid({
                    url: '../Handlers/SchemeDesignHandler.aspx?op=gettemplatetree&pid=1053',
                    idField: 'TMP_ID',
                    treeField: 'TMP_MC',
                    columns: [[
                    { title: '', field: 'TMP_MC', width: 577 }
                ]]
                });
            });

            //点击作业施工
            $("#btnzysg").click(function () {
                $("#divtemplate").treegrid({
                    url: '../Handlers/SchemeDesignHandler.aspx?op=gettemplatetree&pid=1054',
                    idField: 'TMP_ID',
                    treeField: 'TMP_MC',
                    columns: [[
                    { title: '', field: 'TMP_MC', width: 577 }
                ]]
                });
            });


            //点击特殊井
            $("#btntsj").click(function () {
                $("#divtemplate").treegrid({
                    url: '../Handlers/SchemeDesignHandler.aspx?op=gettemplatetree&pid=11405',
                    idField: 'TMP_ID',
                    treeField: 'TMP_MC',
                    columns: [[
                    { title: '', field: 'TMP_MC', width: 577 }
                ]]
                });
            });




            // ********************************** 管柱参数 ******************************

            $("#dialogColumnParams").dialog({
                onOpen: function () {
                    var data = $("#dg").datagrid("getSelected");
                    if (data == null || data == undefined)
                        return;
                    $("#lblqcyzsd2").text(data.ZLHSD);
                    $("#lblSKJDYD1").text(data.SKJD1);
                    $("#lblSKJDYD2").text(data.SKJD2);

                    $.post(
                     '../Handlers/SkgysjbHandler.aspx?op=getygcs',
                     { id: $("#txtHiddenId").val() },
                     function (data, textStatus) {
                         if (data != null || data != undefined) {
                             if (data.length > 0) {
                                 $("#txtPTCD").val(data[0].PTCD);
                                 $("#txtDWDJ").val(data[0].DWDJ);
                                 $("#txtYGGS").val(data[0].YGGS);
                                 $("#txtHiddenYGCSID").val(data[0].ID);
                             }

                         }
                         else {

                         }
                     });
                }
            });

            //修改油管参数
            $("#submitYGCS").click(function () {
                $.post(
                '../Handlers/SkgysjbHandler.aspx?op=updatesygcs',
                {
                    id: $("#txtHiddenYGCSID").val(),
                    yggs: $("#txtYGGS").val(),
                    dwdj: $("#txtDWDJ").val(),
                    ptcd: $("#txtPTCD").val()
                },
                function (data, statusText) {
                    if (data.success) {
                        $("#dialogColumnParams").dialog("close");
                        $("#divEquipmentCalc").dialog("open");
                    }
                    else {
                        $.messager.alert("Error", "提交数据异常！", "Error");
                    }
                }
                );
            });

            // ********************************** 压力起爆装置计算 ******************************

            $("#divEquipmentCalc").dialog({
                onOpen: function () {
                    var data = $("#dg").datagrid("getSelected");
                    if (data == null || data == undefined)
                        return;
                    $("#txtCZSD").val(data.SKJD2);
                    $("#txtMD").val(data.WJYMD);

                }
            });

            // **********************************  ******************************
        });



        //******************* Word 修改保存***********************************

        $(function () {

            $("#UpdatePanel1 [type='input']").change(function () {
                var value1 = null;
                value1 = $(this).val;
                if (value1) {
                    $(this).val = Number(value1).toFixed(2);
                }
            });

            $("#aSubmitSave").click(function () {

                var str = document.getElementById("frame").src;
                if (str.indexOf("Word") >= 0) {
                    window.frames["frame"].SaveFile();
                    alert("保存成功！");
                }
                else {
                    window.frames["frame"].save();
                    alert("保存成功！");
                }


            });
            $("#aClose").click(function () {
                $('#w').window('close');

            });

            $("#three_day").click(function () {
                $("#dg").datagrid("load",
                { jh: $('#txtId').val(), days: '3' });
            });
            $("#today").click(function () {
                $("#dg").datagrid("load",
                { jh: $('#txtId').val(), days: '2' });
            });
            $("#week").click(function () {
                $("#dg").datagrid("load",
                { jh: $('#txtId').val(), days: '7' });
            });


            $('#w').dialog({
                onClose: function () {
                    document.getElementById("frame").src = "#";

                }
            });

        });


        ////************************************************
        function doRefresh(id) {
            if (id == 0)
            { return; }
            document.getElementById('<%= HiddenField1.ClientID %>').value = id;
            document.getElementById('<%= btnRefresh.ClientID %>').click();

        }

        function showInput(obj) {
            var index = obj.selectedIndex;
            var text = obj.options[index].text;

            if (text == "试油井") {
                $("#tab_data tr")[3].style.display = 'inline';

            }
            else {
                $("#tab_data tr")[3].style.display = 'none';
            }
        }

    </script>
    <style type="text/css">
        .gridview
        {
            padding: 1px 1px 1px 1px;
            vertical-align: middle;
            clear: both;
            height: 24px;
            border-collapse: collapse;
            font-size: 15px;
        }
        .gridview td
        {
            border: solid 1px #82D1E7;
            padding: 1px 1px 1px 1px;
            vertical-align: middle;
            clear: both;
            border-collapse: collapse;
            height: 30px;
            padding-left: 2px;
        }
        
        .inputCell
        {
            height: 21px;
            top: 1px;
            left: 28px;
            border: 1px solid lightblue;
            font-family: verdana;
        }
        
        .labelCell
        {
            height: 21px;
            top: 1px;
            left: 28px;
            font-family: verdana;
        }
        .datagrid-row
        {
            height: 25px;
        }
        <!--gridview 中工具栏中 图标文字-->
        span.l-btn-text
        {
            font-size: 14px;
        }
        .select { width:180px; height:24px; background:none; border:none; }
        .tab_header{font-size: 16px; text-align: center; background-color: LightGray }     
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div title="方案设计">
    
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr>
                
                <td style="width: 550px; vertical-align: top">
                    <table id="dg" style="font-size: 15px;">
                    </table>
                    <div id="tb" style="margin-bottom: 1px;">
                        <input type="text" id="txtId" />
                        <a href="#" id="dataid" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">
                            查询所有</a> <a href="#" id="today" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">
                                当天</a> <a href="#" id="three_day" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">
                                    三天</a> <a href="#" id="week" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">
                                        一周</a>
                    </div>
                </td>
                <td style="width: 45px; vertical-align: middle; text-align: center">
                    <asp:Image runat="server" Width="30px" ImageAlign="Middle" ImageUrl="~/images/right_arrow.jpg" />
                </td>
                <td style="vertical-align: middle; text-align: left; align: center">
                    <asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
                    <script type="text/javascript">
                    
                    
                    </script>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                      
                            <div class="easyui-panel" style="padding: 5px; overflow-y: auto; overflow-x: hidden;
                                height: 510px;">
                                <asp:Table ID="tab_data" runat="server" Style="margin-left: 1px;" border="0" CellSpacing="0"
                                    CellPadding="0" Width="100%" class="gridview">
                                </asp:Table>
                                <asp:Button ID="btnRefresh" runat="server" Text="Button" Style="height: 0px; width: 1px;
                                    visibility: hidden" OnClick="btnRefresh_Click" />
                                <asp:HiddenField ID="HiddenField1" runat="server" />
                            </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    <div style="width: 100%; text-align: center; padding: 4px">
                        <a style="margin: 5px; font-size: 14px" id='aSubmitRedirect' data-options="iconCls:'icon-add'"
                            class='easyui-linkbutton'>提交并选择方案</a>
                    </div>
                    <!-- 基础数据 -->
                </td>
                <td valign="top" style="margin-left: 2px; width: 20%">
                    <div id="newdiv" style="margin-left: 15px;">
                    </div>
                </td>
            </tr>
        </table>
        <input type="hidden" id="txtHiddenId">
    </div>
    <%--试油井输入层数--%>
    <div id="dialogCS" class="easyui-dialog" title="输入层数" style="width: 300px; height: 200px"
        data-options="closed:true, collapsible:false, maximizable:false, minimizable:false, buttons:'#dlg-buttons'">
        <div style="margin-left: 10px; margin-top: 10px;">
            层数：<asp:TextBox ID="txtCS" runat="server"></asp:TextBox><br />
            <br />
            <a class="easyui-linkbutton" href="javascript:void(0)" id="btnCS" style="font-size: 15px;">
                确定</a>
        </div>
    </div>
    <!-- 选择方案类型 -->
    <div id="dialogSchemeType" class="easyui-dialog" title="选择方案类型" style="width: 600px;
        height: 450px" data-options="closed:true, collapsible:false, maximizable:false, minimizable:false, buttons:'#dlg-buttons'">
        <div style="margin-left: 1px; margin-top: 1px;">
            <div style="margin: 2px;">
                <a class="easyui-linkbutton" href="javascript:void(0)" id="btngssk" style="font-size: 16px;">
                    管输射孔</a> <a class="easyui-linkbutton" href="javascript:void(0)" id="btndlsk" style="font-size: 16px;">
                        电缆射孔</a> <a class="easyui-linkbutton" href="javascript:void(0)" id="btnzysg" style="font-size: 16px;">
                            作业施工</a> <a class="easyui-linkbutton" href="javascript:void(0)" id="btntsj" style="font-size: 16px;">
                                特殊井</a>
                <%--  <a class="easyui-linkbutton" href="javascript:void(0)" id="old_tmp" style="font-size:20px;">旧模板</a>--%>
            </div>
            <table id="divtemplate" style="width: 580px; height: 320px; margin: 2px;">
            </table>
            <!-- 保存选择的模版ID -->
            <input type="hidden" id="hiddenTempalteID" />
            <input type="hidden" id="hiddenTempalteName" />
        </div>
    </div>
    <div id="dlg-buttons">
        <a href="javascript:void(0)" class="easyui-linkbutton" id="btnzdsc" style="font-size: 16px;">
            自动生成</a>
        <%--   <a href="javascript:void(0)" class="easyui-linkbutton" id="btnrggy" style="font-size:20px;">人工干预</a>--%>
        <a href="javascript:void(0)" class="easyui-linkbutton" style="font-size: 16px;" onclick="javascript:$('#dialogSchemeType').dialog('close')">
            关闭</a>
    </div>
    <!-- 射孔管柱参数 -->
    <div id="dialogColumnParams" data-options="closed:true, buttons:'#dialogColumnParams-buttons'"
        title="管柱参数" style="width: 400px; height: 300px" class="easyui-dialog">
        <table class="gridview" style="margin-top: 1px; margin-left: 1px;" border="0" cellspacing="0"
            cellpadding="0" width="97%">
            <tr>
                <td>
                    炮头长度(m)
                </td>
                <td>
                    <input type="text" class="inputCell" id="txtPTCD" class="easyui-validatebox" data-options="required:true,validType:'number'" />
                </td>
            </tr>
            <tr>
                <td>
                    定位短节
                </td>
                <td>
                    <input type="text" class="inputCell" id="txtDWDJ" />
                </td>
            </tr>
            <tr>
                <td>
                    油管根数
                </td>
                <td>
                    <input type="text" class="inputCell" id="txtYGGS" />
                </td>
            </tr>
            <tr>
                <td>
                    油顶(m)
                </td>
                <td>
                    <label type="text" class="labelCell" id="lblSKJDYD1" />
                </td>
            </tr>
            <tr>
                <td>
                    油底(m)
                </td>
                <td>
                    <label type="text" class="labelCell" id="lblSKJDYD2" />
                </td>
            </tr>
            <tr>
                <td>
                    前磁遇阻深度(m)
                </td>
                <td>
                    <label id="lblqcyzsd2" class="labelCell" />
                </td>
            </tr>
        </table>
        <input type="hidden" id="txtHiddenYGCSID">
    </div>
    <div id="dialogColumnParams-buttons">
        <a href="javascript:void(0)" class="easyui-linkbutton" id="dialogColumnParams-pre"
            onclick="javascript:$('#dialogColumnParams').dialog('close');$('#dialogSchemeType').dialog('open');">
            上一步</a> <a href="javascript:void(0)" class="easyui-linkbutton" id="submitYGCS">下一步-压力起爆装置计算</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript:$('#dialogColumnParams').dialog('close')">
            关闭</a>
    </div>
    <!-- 压力起爆装置计算 -->
    <div id="divEquipmentCalc" data-options="closed:true, buttons:'#divEquipmentCalc-buttons'"
        title="压力起爆装置计算" style="width: 400px; height: 300px" class="easyui-dialog">
        <table class="gridview" style="margin-top: 1px; margin-left: 1px;" border="0" cellspacing="0"
            cellpadding="0" width="97%">
            <tr>
                <td>
                    垂直深度h(单位:m)
                </td>
                <td>
                    <input type="text" class="inputCell" id="txtCZSD" class="easyui-validatebox" data-options="required:true,validType:'number'" />
                </td>
            </tr>
            <tr>
                <td>
                    ρ(单位:kg/m³)
                </td>
                <td>
                    <input type="text" class="inputCell" id="txtMD" class="easyui-validatebox" data-options="required:true,validType:'number'" />F
                </td>
            </tr>
            <tr>
                <td>
                    g(单位:N/吨)
                </td>
                <td>
                    <label class="labelCell">
                        0.0098</label>
                </td>
            </tr>
            <tr>
                <td>
                    压力起爆装置所处位置温度(单位:℃)
                </td>
                <td>
                    <label id="lblTemp" class="labelCell">
                    </label>
                </td>
            </tr>
            <tr>
                <td>
                    剪切销值随温度降低百分率(单位:%)
                </td>
                <td>
                    <label class="labelCell">
                        Δ= 1.71</label>
                </td>
            </tr>
        </table>
    </div>
    <div id="divEquipmentCalc-buttons">
        <a href="javascript:void(0)" class="easyui-linkbutton" id="A1" onclick="javascript:$('#divEquipmentCalc').dialog('close');$('#dialogColumnParams').dialog('open');">
            上一步</a> <a href="javascript:void(0)" class="easyui-linkbutton" id="A4">下一步</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript:$('#divEquipmentCalc').dialog('close')">
            关闭</a>
    </div>
    <div id="w" class="easyui-dialog" title="手动修改" data-options="iconCls:'icon-edit',closed:true,toolbar: '#dlg-toolbar'"
        style="width: 920px; height: 650px; padding: 0px; z-index: 10000000">
        <div id="dlg-toolbar" style="padding: 2px 0">
            <table cellpadding="0" cellspacing="0" style="width: 100%">
                <tr>
                    <td style="padding-left: 2px">
                        <a href="javascript:void(0)" id="aSubmitSave" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true">
                            保存</a> <a href="javascript:void(0)" id="aClose" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true">
                                关闭</a>
                    </td>
                    <td style="text-align: right; padding-right: 2px">
                        <input class="easyui-searchbox" data-options="prompt:'Please input somthing'" style="width: 150px"></input>
                    </td>
                </tr>
            </table>
        </div>
        <div style="padding: 0px; height: 100%">
            <iframe src="#" id="frame" width="100%" height="100%" scrolling="no" style="padding: 0px">
            </iframe>
        </div>
        <%--	<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'west',split:true" style="width:250px">

            <table id="Table1" title="超链接管理" class="easyui-datagrid" style="width:250px;height:650px"
            url="get_users.php"
            toolbar="#toolbar" pagination="false"
            rownumbers="true" fitColumns="false" singleSelect="true">
        <thead>
            <tr>
                <th field="firstname" width="150px">文本</th>
                <th field="lastname" width="50px">行号</th>
              
            </tr>
        </thead>
    </table>
    <div id="toolbar">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newHyperLink()">New</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editHyperLink()">Edit</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="destroyHyperLink()">Remove</a>
    </div>
    
   <div id="dlg" class="easyui-dialog" style="width:400px;height:180px;padding:10px 20px; z-index:10000"
            closed="true" buttons="#dlg-buttons">
        <div class="ftitle">HyperLink Information</div>
        <form id="fm" method="post" novalidate>
            <div class="fitem">
                <label>选择行:</label>
                <input name="firstname" class="easyui-validatebox" required="true">
            </div>
            <div class="fitem">
                <label>文本内容:</label>
                <input name="lastname" class="easyui-validatebox" required="true">
            </div>
           
        </form>
    </div>
    <div id="Div1">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveUser()">Save</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">Cancel</a>
    </div>
   

   </div>


			<div data-options="region:'center'" style="padding:0px;">
				
                <iframe src="#" id="frame"  width="100%" height="100%"></iframe>
			</div>
			<div data-options="region:'south',border:false" style="text-align:right;padding:0px;">
				<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="javascript:alert('ok')">Ok</a>
				<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="javascript:alert('cancel')">Cancel</a>
			</div>
		</div>--%>
    </div>
    </form>
</body>
</html>
